<HTML>
<HEAD>
<TITLE>
mapscript_supp.c</TITLE>
<BODY BGCOLOR="#ffffff">
<H1>mapscriptsupp.tcl</H1>

<HR><H1> Mapscript Supplemental Procedures </H1>
<UL>
<LI> 1. proc mapscript::classObjRef
<LI> 2. proc mapscript::colorObjRef
<LI> 3. proc mapscript::errorObjRef
<LI> 4. proc mapscript::featureListNodeObjRef
<LI> 5. proc mapscript::itemObjRef
<LI> 6. proc mapscript::labelCacheMemberObjRef
<LI> 7. proc mapscript::labelCacheObjRef
<LI> 8. proc mapscript::labelObjRef
<LI> 9. proc mapscript::layerObjRef
<LI> 10. proc mapscript::legendObjRef
<LI> 11. proc mapscript::lineObjRef
<LI> 12. proc mapscript::mapObjRef
<LI> 13. proc mapscript::markerCacheMemberObjRef
<LI> 14. proc mapscript::pointObjRef
<LI> 15. proc mapscript::projectionObjRef
<LI> 16. proc mapscript::queryMapObjRef
<LI> 17. proc mapscript::rectObjRef
<LI> 18. proc mapscript::referenceMapObjRef
<LI> 19. proc mapscript::resultCacheMemberObjRef
<LI> 20. proc mapscript::resultCacheObjRef
<LI> 21. proc mapscript::scalebarObjRef
<LI> 22. proc mapscript::shapeObjRef
<LI> 23. proc mapscript::shapefileObjRef
<LI> 24. proc mapscript::symbolSetObjRef
<LI> 25. proc mapscript::webObjRef
<LI> 26. proc mapscript::DBFInfoRef
</UL>

<H2> Usage </H2>
<P> 
These procedures allow methods to be invoked on object references 
(i.e., pointers), without having to convert a reference into an object.
A valid object reference is required; procedures check for valid object types.
<P>
General syntax:
<BLOCKQUOTE>
objectRefProc  $objectPtr  args
</BLOCKQUOTE>
<P>
Sample:
<BLOCKQUOTE>
set map [mapscript::mapObj -args $mapFile]
<BR>
set rectPtr [$map cget -extent]
<BR>
set minx [<B>mapscript::rectObjRef</B> $rectPtr cget -minx]
<BR>
set miny [<B>mapscript::rectObjRef</B> $rectPtr cget -miny]
<BR>
</BLOCKQUOTE>
<P>
Notes:  each of the <EM>objectRef</EM> procedures is just a shortcut to invoke a
SWIG generated method name.   Method names of:
<UL>
<LI> cget
<LI> configure
<LI> delete
</UL>
invoke that object's cget, configure, and delete method respectively.
<P> Example:
<BLOCKQUOTE>
mapscript::rectObjRef $rectPtr cget -minx
</BLOCKQUOTE>
is equivalent to:
<BLOCKQUOTE>
mapscript::rectObj_minx_get $rectPtr
</BLOCKQUOTE>

<HR><H1> Mapscript Convenience Procedures </H1>
<UL>
<LI> 1. proc mapscript::getDBFNames
<LI> 2. proc mapscript::getDBFTypes
<LI> 3. proc mapscript::getDBFValues
<LI> 4. proc mapscript::getQueryInfo
</UL>

<H2> Usage </H2>
<P><b>mapscript::getDBFNames <em> DBFInfo_handle </em></b><br>
getDBFNames returns a list of field names from a DBF file handle.  The
<em> DBFInfo_handle </em> must be a valid DBFInfo handle returned from
the DBFInfo constructor.

<P><b>mapscript::getDBFTypes <em> DBFInfo_handle </em></b><br>
getDBFTypes returns a list of field types and lengths from a DBF file handle.  
The <em> DBFInfo_handle </em> must be a valid DBFInfo handle returned from
the DBFInfo constructor.  Each list element is itself a list of field type
and field length.  Valid field types are returned as: <b>string</b>,
<b>integer</b>, and <b>double</b>. 

<P><b>mapscript::getDBFValues <em> DBFInfo_handle record_number </em></b><br>
getDBFValues returns a list of field values from a DBF file handle.  The
<em> DBFInfo_handle </em> must be a valid DBFInfo handle returned from
the DBFInfo constructor.  <em>Record_number</em> is the record number of the
row to fetch.

<P><b>mapscript::getQueryInfo <em> mapObj_pointer  layerObj_pointer 
</em></b><br>
getQueryInfo returns a list of name-value
pairs from a layer that map query has generated.  
<em> mapObj_pointer</em> and <em>queryObj_pointer</em> must be valid 
mapObj and layerObj pointers.


<BR>
<HR>
<H1>See also</H1>
<P>
See <A HREF="mapscript_wrap.html">mapscript_wrap.html</A> for the full
Mapscript Tcl interface.
<P>
Note also that the Mapscript objects described in mapscript_wrap.html are
defined in the <b> mapscript </b> namespace.
<P>
Tom Poindexter
<BR>
tpoindex@nyx.net
<BR>

</BODY>
</HTML>
